package com.atldy.commerce.pojo;

import com.atldy.commerce.account.UserAddressInfo;
import com.atldy.commerce.commence.goods.SimpleGoodsInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * <h2> 分页订单商品对象 </h2>
 *
 * @Author: li-dong-yang
 * @CreateTime: 2021-11-04 0:17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "分页订单商品对象", description = "分页订单商品对象")
public class PageSimpleOrderInfo {

    @ApiModelProperty("是否可以分页")
    private Boolean hasMove;

    @ApiModelProperty("订单列表")
    private List<SingleOrderItem> singleOrderItemList;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(value = "单项订单信息", description = "分页订单商品对象")
    public static class SingleOrderItem {

        @ApiModelProperty("订单ID")
        private Long orderId;

        @ApiModelProperty("用户地址信息")
        private UserAddressInfo userAddress;

        @ApiModelProperty("商品信息")
        private List<SingleGoodsItem> singleGoodsItemList;
    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(value = "单项商品信息", description = "单项商品信息")
    public static class SingleGoodsItem {

        @ApiModelProperty("简单商品信息")
        private SimpleGoodsInfo simpleGoodsInfo;

        @ApiModelProperty("商品个数")
        private Integer count;
    }


}